package org.linlinjava.litemall.db.dao;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.vo.IncomeTotalStatistics;
import org.linlinjava.litemall.db.vo.PromoteStatistics;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface UserStatisticsMapper {
    List<IncomeTotalStatistics> incomeTotalStatistics(@Param("userId") Integer userId);

    BigDecimal pendingAmountStatistics(@Param("userId") Integer userId);

    List<IncomeTotalStatistics> todayAmountStatistics(@Param("userId") Integer userId,@Param("startTime") Date startTime,@Param("endTime") Date endTime);

    BigDecimal totalWithdrawAmountStatistics(@Param("userId") Integer userId);

    PromoteStatistics findPromoteStatistics(@Param("userId") Integer userId);

    void updateBalance(@Param("userId") Integer userId,@Param("price")  BigDecimal price);
}
